package com.jishuo.nontax.bean.vo;

import com.jishuo.nontax.bean.bank.NewItemDTO;
import com.jishuo.nontax.bean.message.SetItemDTO;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;



/**
 * 项目（科目）信息
 * 
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class ItemVO implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//唯一标识号
	private Long itemid;
	//项目编码
	private String itemcode;
	//项目名称
	private String itemname;
	//是否可用
	private Integer isenable;
	//操作时间
	private String writetime;
	//是否有收费标准限制(0：否1：是)
	private Integer islimit;
	//收费标准上限
	private BigDecimal upperlimit;
	//收费标准下限
	private BigDecimal lowerlimit;

	private String operate;
	private String measureunit;
    private Long unitid;
    private String unitcode;
    private String unitname;
    private Long cantonid;
    private String cantonname;

	public ItemVO(){}

	public ItemVO(NewItemDTO bean){
        if(bean.getItemid()!=null){
            this.itemid = Long.valueOf(bean.getItemid());
        }
        if(bean.getIslimit()!=null){
            this.islimit = Integer.valueOf(bean.getIslimit());
        }
        if(bean.getUpperlimit()!=null){
            this.upperlimit = new BigDecimal(bean.getUpperlimit());
        }
        if(bean.getLowerlimit()!=null){
            this.lowerlimit=new BigDecimal(bean.getLowerlimit());
        }
        if(bean.getIslimit()!=null){
            this.islimit= Integer.valueOf(bean.getIslimit());
        }
        this.itemcode = bean.getItemcode();
        this.itemname = bean.getItemname();
        this.operate = bean.getOperate();
        this.measureunit = bean.getMeasureunit();
    }

	public ItemVO(SetItemDTO bean){
	    if(bean.getItemid()!=null){
            this.itemid = Long.valueOf(bean.getItemid());
        }
        if(bean.getIslimit()!=null){
            this.islimit = Integer.valueOf(bean.getIslimit());
        }
        if(bean.getUpperlimit()!=null){
            this.upperlimit = new BigDecimal(bean.getUpperlimit());
        }
        if(bean.getLowerlimit()!=null){
            this.lowerlimit=new BigDecimal(bean.getLowerlimit());
        }
        if(bean.getIslimit()!=null){
            this.islimit= Integer.valueOf(bean.getIslimit());
        }
        this.itemcode = bean.getItemcode();
        this.itemname = bean.getItemname();

    }

}
